package com.example.springbootexam.bean;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
public class UserInfo extends User {
    @NotBlank(message = "密码不能为空!")
    @Length(min = 4, max = 16, message = "密码的长度必须是4~16个字符")
    @Pattern(regexp = "[\\w&@\\*]{4,16}", message = "密码必须由数字字母特殊字符构成")
    String repwd;
}
